
echo "Generating JSON input file from excel macros by running Apple script..."
osascript /Users/yha03/Documents/MyWorkSpace/sb-ofs-mobile-qa-test/shell/AppleScriptToLaunchExcelMacro.scpt

# echo "Starting the SOAP UI Mock REST Service..."
# /Applications/SoapUI-5.0.0.app/Contents/java/app/bin/mockservicerunner.sh -m "REST MockService 1" "/Users/yha03/Documents/ExcelMacroForJson/REST-Project-1-soapui-project.xml"

echo "Moving the json data file to application data directory"
mv /Users/yha03/Documents/ExcelMacroForJson/final_json_for_testing.json "/Users/yha03/Documents/Aptana Studio 3 Workspace/sb-ofs-mobile/src/main/webapp/data/territory1/territory1_page1.json"

echo "Setting the PATH Variable"
export PATH="/usr/local/bin:$PATH"
echo $PATH


echo "Navigating to buildandrun.sh directory…"
cd "/Users/yha03/Documents/Aptana Studio 3 Workspace/sb-ofs-mobile"
pwd


echo "Starting buildandrun.sh script…"
./buildandrun.sh


echo "Starting sb_build_monkeytalk.sh script.."
"/Users/yha03/Documents/MyWorkSpace/sb-ofs-mobile-qa-test/shell/sb_build_monkeytalk.sh"


      
echo "Shell Script Completed."